<?php

/**
 * @author edson
 * @copyright 2011
 */

class CMainMenu
{
	
   public	$items;
	
	private function __construct()
	{
	 	$this->items["Ingresar"]=array("javascript:showLogMenu('logmenu')" => "Logeo","....",".....");
	 	$this->items["Otros"]=array("log.php?op=nuevo1"=>"campo ","log.php?op=nuevo2"=>"campo2");

	}
	
	public function ver_menu($menuactivo=0)
	{   ?>
         <div class='accordion'>
         <?php
		$cont=1;
		foreach($this->items as $ind => $valor)
		{ 
		     ?>
            <h3 <?php if($cont==$menuactivo) echo "class='idac'"; ?>  ><a href="#"    ><?php echo $ind;  ?></a></h3>          
            
      		<p <?php if($cont==$menuactivo) echo "class='idac'"; ?> >
        <?php  $cont++;
		       foreach($valor as $ind1 => $valor1) 
		       {
	    ?>
			  <a href=<?php  echo $ind1; ?>><?php echo $valor1;  ?></a><br />
		 <?php } ?>
              
        </p>
  
	<?php
	    }
	?>
		</div><!-- fin de acordeon -->
      

      
   
        
 <?php 
     }

 public function f_acordeon()
 {
 ?>
 <script type="text/javascript">
$(document).ready(function(){
	$(".accordion h3.idac").addClass("active");
    $(".accordion p:not(.idac)").hide();
    $(".accordion h3").click(function(){
		$(this).next("p").slideToggle("slow").siblings("p:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active"); 
	});
});
</script>
<?php
}







private static $instance;
  public static function getInstance()
  {
	   if(self::$instance==null)
	   {
		self::$instance=new CMainMenu();   
	   }
	   return self::$instance;
	  
  }

}

?>
